<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <title>错误信息</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <!--<link th:href="@{/static/css/semantic.css}" rel="stylesheet" type="text/css">-->
    <script th:src="@{/static/js/jquery-3.1.1.min.js}"></script>
    <script th:src="@{/static/js/template-web.js}"></script>
    <link th:href="@{/static/css/qinstyle.css}" rel="stylesheet">
    <link th:href="@{/static/layui-v2.5.5/css/layui.css}" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" th:src="@{/static/layui-v2.5.5/layui.js}"></script>
    <script type="text/javascript" th:src="@{/static/js/common.js}"></script>
    <script th:src="@{/static/js/semantic.min.js}"></script>
    <!--semantic-ui 必须用这个 用路径下的不行 会缺失样式-->
    <link type="text/css" href="https://cdn.bootcss.com/semantic-ui/2.4.1/semantic.min.css" rel="stylesheet">
    <style>
        html, body {
            height: 100%;
            width: 100%;
            overflow: auto;
            margin: 0;
        }

        html {
            overflow-y: scroll;
        }
    </style>
</head>
<body>
<!--主容器-->
<div class="ui container" th:width="1500px">

    <div class="ui segment" id="index-header-nav" th:fragment="nav-menu">
        <div class="ui secondary menu" sec:authorize="isAuthenticated()">  <!--如果登录了 就展示相关信息-->
            <a class="item" th:href="@{/}">首页</a>
            <span class="hidden" hidden="hidden" id="user" sec:authentication="name"></span>
            <div class="right menu" sec:authorize="hasAuthority('student')">
                <div class="right menu"> <!--展示相对于权限的东西-->
                    <a class="item" th:href="@{/info}">
                        <i class="icon user"></i>
                        个人选课信息
                    </a>
                    <a class="item">
                        欢迎你,<span sec:authentication="principal.studentName"></span>
                    </a>
                    <a class="item" href="/logout">
                        <i class="sign-out icon"></i>注销
                    </a>
                </div>
            </div>
            <div class="right menu" sec:authorize="hasAuthority('admin')">
                <div class="right menu"> <!--展示相对于权限的东西-->
                    <a class="item" th:href="@{/manager}">
                        <i class="icon user"></i>
                        学生选课统计
                    </a>
                    <a class="item">
                        欢迎你,<span sec:authentication="name"></span>
                    </a>
                    <a class="item" href="/logout">
                        <i class="sign-out icon"></i>注销
                    </a>
                </div>
            </div>

        </div>
    </div>
    <div class="ui small test modal" id="alertUI">
        <i class="close icon"></i>
        <div class="header">
            退选课程
        </div>
        <div class="content">
            <p>你确定要退选课程吗？</p>
        </div>
        <div class="actions">
            <div class="ui negative button">
                取消
            </div>
            <div class="ui positive button">
                确定
            </div>
        </div>
    </div>
    <div class="ui small test modal" id="alertMsg">
        <i class="close icon"></i>
        <div class="header">
            信息
        </div>
        <div class="content">
            <p id="msg"></p>
        </div>
        <div class="actions">
            <div class="ui positive button" onclick="">
                确定
            </div>
        </div>
    </div>

    <div class="ui segment" style="text-align: center">
        <h3>网上在线选课系统</h3>
    </div>

    <div class="ui negative message">
        <i class="close icon"></i>
        <div class="header">
            <h1>用户权限不足或系统异常</h1>
        </div>
    </div>
</div>

</body>

</html>